begintalkscript;
variables;

begintalknode 1;	// Raelnis, Renegade Vahnatai
state = -1;
personality = 20;
nextstate = 1;
question = "Raelnis";
text1 = "This bizzare creature stares at you, curious of what to make of you.  Its eyes glow with interest, and it lightens the grip on its strange wavelike blade a little.";
text2 = "Eventually it speaks to you, fluently in your own tongue.  _I am Raelnis of the Vahnatai.  Who are you that comes to this desolate place?  I have not seen your kind here before._";
text5 = "Raelnis nods in greeting.  He is sitting, sharpening and cleaning his waveblade.";
action = INTRO;

begintalknode 2;
state = 1;
condition = get_flag(1,27) == 0;
nextstate = 2;
question = "I am an adventurer, seeking the treasures that lie within these caves.";
text1 = "He lowers his blade.  _I conclude you are not a threat to me, then, for I have no treasure.  Though I have seen many things of great value within the caves._";
text2 = "_I traveled through the caves north of here to get to where I am.  It was dangerous, and I had to put many demonic creatures to rest as I passed.  That was many years ago._";
code = 
	set_flag(1,27,1);
break;

begintalknode 3;
state = 2;
nextstate = 3;
question = "Why did you come here, and why through those caves?";
text1 = "_It would be best that I start from the very beginning of my struggles,_ he says, and motions for you to sit down.  Once you are comfortable, he begins his tale.";
text2 = "_Long ago I once was a part of a strong Vahnatai tribe.  These Vahnatai, unfortunately, were predisposed against human beings, and when they learned of the Empire's great greed and poisonous corruption, they made it their goal to destroy all human life._";
text3 = "_I disagreed, but I kept to myself.  When they started making plans to harm the humans, I decided it was time to act.  So I stole into the Soul Crystal Rooms in the cover of night, and took one of the Soul Crystals in order to damage their operation._";
text4 = "_Unfortunately, I got this piece of junk._  He points to the crystal pedestal in the back, and you hear a small _Hey!_ emanate from the crystal.";

begintalknode 4;
state = 3;
nextstate = 4;
question = "Piece of junk?  What do you mean?";
text1 = "_Alhough Vahnatai don't like to admit it, even they make mistakes sometimes.  A soul of a great and powerful Vahnatai was supposed to transcend into this crystal.  Somehow, the ritual went awry and they got the wrong being._";
text2 = "_Inside the crystal is the soul of Banek, one of the most foolish Vahnatai I ever met.  He's even as bad as--_  He stops himself.  _Forgive me.  I mean no insult, but most Vahnatai are grave and serious.  This one is as boisterous as a human._";
text3 = "_Although he is useful at times, he is not the best travelling companion one could hope for._  The crystal sounds annoyed as it says, _Well, MAYBE I'd be more agreeable if you wouldn't jolt me around so much when we travel!_  Raelnis sighs.  _You see?_";
text4 = "_Needless to say, stealing this crystal did not hinder them much.  They still wanted me dead, though, so I fled as far as possible.  It took me over sixty years to lose them.  Vahnatai do not easily forget._";

begintalknode 5;
state = 4;
nextstate = -1;
question = "So you are here in hiding?";
text1 = "He nods.  _I have been living well here, for I managed to seal off the path I came from.  I erected magical barriers to keep the demons in.  Though I laid them to rest, it is sure that they returned from the demon plane by now._";
text2 = "_If you wish to go in, I will lower the barriers.  But I warn you, only the most skilled of warriors can travel in such an area.  You should be prepared for the worst before you set foot near it._";
text3 = "_Go ahead and ask Banek here if you want the barriers lowered.  If you intend to go in, I wish you luck._";
action = END_TALK;

begintalknode 6;
state = 1;
condition = get_flag(1,27) == 1;
nextstate = -1;
question = "Why do you not leave to the surface?";
text1 = "_I do not want to be rediscovered by the Vahnatai, and even if they do not, there is nowhere for me to go.  I am quite content simply dwelling in these caves._";
text2 = "_Besides, I do not wish to put up with traveling with Banek again.  Saying that he can be irritating is putting it mildly._";

begintalknode 7;
state = 1;
condition = get_flag(1,27) == 1;
nextstate = 5;
question = "That's quite a nice sword.";
text1 = "He nods.  _Thank you.  I recieved it as my initiation gift when becoming a Blade.  It saved me many times.  Strange to think that my life has depended upon a piece of sharpened metal, isn't it._";

begintalknode 8;
state = 5;
nextstate = 6;
condition = get_flag(1,28) == 0;
question = "What's a Blade?";
text1 = "_A Blade is the highest rank of warrior in the tribes of the Vahnatai.  Since my crime against the tribe, I am probably not referred to as a Blade anymore, seeing as Blade is a title of honor._";
text2 = "_But I think I have earned it for my refusal of such evils as what my tribe wished._";

begintalknode 9;
state = 6;
nextstate = -1;
question = "I see.";
text1 = "He nods, then continues to tend to his blade.";
action = END_TALK;
code = 
	set_flag(1,28,1);
break;

begintalknode 9;
state = 6;
nextstate = -1;
question = "Your decision is worthy of such a title.";
text1 = "_Thank you._  He returns to cleaning his blade.";
action = END_TALK;
code = 
	set_flag(1,28,1);
break;


begintalknode 11;
state = 6;
nextstate = -1;
question = "You sure are being modest.";
text1 = "_I would be lying if I said I felt otherwise.  I am not boasting, I am stating a fact.  That is in truth what I think.  Truth should not stoop to Modesty._";
text2 = "_But you may think what you like.  If you have more sarcasm, you ought to share it with Banek.  He enjoys such things._";
action = END_TALK;
code = 
	set_flag(1,28,1);
break;

begintalknode 12;	// Banek, Soul Crystal
state = -1;
personality = 21;
nextstate = 10;
question = "Banek";
text1 = "You approach the crystal, and it glows.  _Hey,_ it says. _I'm Banek.  It's nice to have someone to talk other than grumpy old Raelnis.  He's not bad, but he has no sense of humor at all._";
text2 = "_He can't appreciate a good knock-knock joke at all.  He doesn't let me sing at all, either.  I can't even tell him poems!  He's so strict and serious all the time.  But anyway, how's it going?_";
text3 = "_No, don't tell me.  Having fun hacking up goblins and ghouls, I bet.  I wish I could kill some baddies, but Raelnis says I shouldn't torment them with my mind controlling powers.  It's no fun if I can't do that._";
text5 = "The crystal glows when you come near.  _Hi again, buddy.  So you're not dead in some ditch yet, eh?  What can I do for ya?_";
action = INTRO;

begintalknode 13;
state = 10;
condition = get_flag(1,29) == 0;
nextstate = -1;
question = "Can you lower the barriers for me?";
text1 = "_Sure can.  I'll have 'em down in a jiffy._  The crystal brightens gradually, until its light fills the whole room.  You cover your eyes to keep from being blinded.  Soon the light dims into the same quiet glow that was present before.";
text2 = "_The barriers are gone, so you can enter now._";
action = END_TALK;
code = 
	set_flag(1,29,1);
	put_object_on_space(30,19,-1);
	put_object_on_space(31,19,-1);
break;

begintalknode 14;
state = 10;
nextstate = -1;
question = "Do you know any good knock-knock jokes?";
text1 = "_Nope!  None of mine are any good.  But I bet if I told a good one to Raelnis, he'd think it was just stupid.  He's like that, y'know?_";

begintalknode 15;
state = 10;
nextstate = -1;
condition = (get_flag(2,13) == 0);
question = "What did you mean by tormenting enemies with mind control powers?";
text1 = "The crystal laughs, as strange as it seems.  _Let me just say this.  Have you ever seen a goblin dance the macarena?_  It chuckles.  _I didn't think so._";
code = 
	set_flag(2,13,1);
break;

begintalknode 16;
state = 10;
nextstate = -1;
question = "Do you like living here?";
text1 = "_Well, it sure beats traveling or sitting in that stupid room alone back with the Vahnatai tribe.  One thing's for sure:  existence is a lot less boring since I got stolen away._";

begintalknode 17;
state = 10;
nextstate = -1;
question = "How did you become a Soul Crystal?";
text1 = "_I dunno exactly.  It was after a large battle with the hydras, and many were slain... I was among them.  Other Vahnatai came to encase the soul of a dead sage,  but I guess they did it when there were too many freshly killed souls around._";
text2 = "_The spiritual world is a weird place.  I wasn't there long.  I found myself whisked away by their magic, and before I knew it I was back in reality and then shunned into an empty room._";
text3 = "_They didn't destroy me because Vahnatai customs don't allow the breaking of crystals.  But as a Soul Crystal, I do get some nice magical powers, so it's fine with me._";
text4 = "The crystal glows brightly as if to show off its power.  _At least I have someone to talk to now.  Raelnis values life, at least, if not humor.  Not like those cold-blooded Vahnatai back home._";